//
//  TaoCanCell.m
//  XDBaseFrameWork
//
//  Created by XD-XY on 10/11/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "TaoCanCell.h"

@implementation TaoCanCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self makeViews];
    }
    return self;
}

-(void)makeViews
{
    self.upline = [UIView initViewRect:CGRectMake(0, 0, UI_SCREEN_WIDTH, 0.5) andBackGroudColor:UIColorFromRGB(0xd4ccc5)];
    
    self.downline = [UIView initViewRect:CGRectMake(0, 100.5, UI_SCREEN_WIDTH, 0.5) andBackGroudColor:UIColorFromRGB(0xd4ccc5)];
    
    [self.contentView addSubview:_upline];
    [self.contentView addSubview:_downline];
    
    NSArray * imgArr = @[LOADIMAGE(@"taocanic1@2x"),LOADIMAGE(@"taocanic2@2x"),LOADIMAGE(@"taocanic3@2x"),LOADIMAGE(@"taocanic4@2x")];
    NSArray * titleArr = @[@"服装造型",@"拍摄张数",@"调修张数",@"底片"];
    for (int i=0;i<4;i++){
        UIImageView * iv = [UIImageView initImageViewRect:CGRectMake(32*(i+1)+40*i, 12.5, 40, 40) andImage:[imgArr objectAtIndex:i] andUserInteractionEnabled:YES];
        [self.contentView addSubview:iv];
        
        UILabel * lb = [UILabel initLabelText:[titleArr objectAtIndex:i] andRect:CGRectMake((32+40)*i,height_y(iv)+8,32+40+32, 13) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13] andTextColor:UIColorFromRGB(0x999999) andTextAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:lb];
        
    }
    
    self.countLB1 = [UILabel initLabelText:@"" andRect:CGRectMake(0, 77, 32+40+32, 13) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13] andTextColor:UIColorFromRGB(0x453d35) andTextAlignment:NSTextAlignmentCenter];
    
    self.countLB2 = [UILabel initLabelText:@"" andRect:CGRectMake(32+40, _countLB1.frame.origin.y, 32+40+32, 13) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13] andTextColor:UIColorFromRGB(0x453d35) andTextAlignment:NSTextAlignmentCenter];
    
    self.countLB3 = [UILabel initLabelText:@"" andRect:CGRectMake((32+40)*2, _countLB1.frame.origin.y, 32+40+32, 13) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13] andTextColor:UIColorFromRGB(0x453d35) andTextAlignment:NSTextAlignmentCenter];
    
    self.countLB4 = [UILabel initLabelText:@"" andRect:CGRectMake((32+40)*3, _countLB1.frame.origin.y, 32+40+32, 13) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:13] andTextColor:UIColorFromRGB(0x453d35) andTextAlignment:NSTextAlignmentCenter];
    
    [self.contentView addSubview:_countLB1];
    [self.contentView addSubview:_countLB2];
    [self.contentView addSubview:_countLB3];
    [self.contentView addSubview:_countLB4];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
